import { Controller, Get, Post } from '@midwayjs/decorator';

@Controller('/zch')
export class HomeController {
  @Get('/name')
  async name(): Promise<string> {
    return 'zch!';
  }

  @Get('/z1')
  async z1() {
    return 'Hello Midwayjs!';
  }

  @Post('/update')
  async updateData() {
    return 'This is a post method';
  }
}
